        <!--banner图-->
        {!! Theme::partial('homebanner') !!}
        <!--banner图end-->

        <div class="shop hidden-xs" onselectstart="return false;">
			<div class="container">
				<div class="row ">
					<!--购物列表-->
					<div class="shop1">
						购物列表
					</div>
					<div class="shop2 col-md-12 hidden-xs">
						<label class="col-md-1"><input type="checkbox" id="allCheck"><i>✓</i></label>
						<span class="col-md-2">全选</span>
						<span class="col-md-3">商品信息</span>
						<span class="col-md-2">单价(/斤)</span>
						<span class="col-md-2">数量</span>
						<span class="col-md-2">操作</span>
					</div>
                    @foreach($carts as $k => $v)
					<div class="shop3 col-md-12 ">
						<label class="col-md-1 "><input type="checkbox" name="check{{$k}}"><i>✓</i></label>
						<div class="col-md-2 col-xs-4">
							<img src="/{{$v->file_path}}">
						</div>

						<div class="col-md-3 col-xs-4">
							<span>{{$v->title}}</span>

							{{--<span class="hidden-sm hidden-md">优质的饲料配方|专业的饲料</span>--}}
						</div>
						<span class="col-md-2 shop3-1 hidden-xs">¥{{$v->cost}}</span>
						<div class="col-md-2 col-xs-3">
							<span class="cart2-6-11 ">
								<span class=" cart111">-</span>
								<span class=" cart111">{{$v->num}}</span>
								<span class=" cart111">+</span>
							</span>
						</div>
						<div class="del col-md-2" order_id="{{$v->id}}">
							<img src="{{Theme::asset()->url('img/delete.png')}}">
						</div>
					</div>
                    @endforeach
					<div class="shop2 col-md-12">
						<label class="col-md-1"><input type="checkbox" checked=""><i>✓</i></label>
						<div class="col-md-2">
							<span>已选择</span>
							<span>(2)</span>
						</div>
						<div class="col-md-1">
							|
						</div>
						<div class="col-md-2">
							全部删除
						</div>
						<div class="col-md-2 col-md-offset-2 shop2-11">
							<span>合计:</span>
							<span class="shop2-1">¥138</span>
							<br>
							<span>(邮费0元)</span>
						</div>
						<div class="col-md-2 shop2-2">
							<a href="finish.html">下单</a>
						</div>
					</div>
					<div class="shop4 col-md-2 col-md-offset-10 hidden-xs">
						<a href="index.html">继续购物</a>
					</div>
					<!--可能喜欢-->
					<div class="shop5 hidden-xs">
						您可能喜欢
					</div>
					<div class="shop6 hidden-xs">
						<div class="like">
							<div class="like-1">
								<img src="img/zx2.png">
							</div>
							<div class="like-2">
								<a href="#">
									<span class="glyphicon glyphicon-eye-open"></span>
									<span>了解详情</span>
								</a>
								<a href="#">
									<span class="glyphicon glyphicon-shopping-cart"></span>
									<span>加入购物车</span>
								</a>
							</div>

							<div class="like-4">
								<div class="like-4-1">无抗猪肉-放心猪肉</div>
								<div class="like-4-2">慢养300天,肉香浓郁</div>
								<div class="like-4-3">¥69/斤</div>
							</div>
						</div>
						<div class="like">
							<div class="like-1">
								<img src="img/zx2.png">
							</div>
							<div class="like-2">
								<a href="#">
									<span class="glyphicon glyphicon-eye-open"></span>
									<span>了解详情</span>
								</a>
								<a href="#">
									<span class="glyphicon glyphicon-shopping-cart"></span>
									<span>加入购物车</span>
								</a>
							</div>
							<div class="like-4">
								<div class="like-4-1">无抗猪肉-放心猪肉</div>
								<div class="like-4-2">慢养300天,肉香浓郁</div>
								<div class="like-4-3">¥69/斤</div>
							</div>
						</div>
						<div class="like">
							<div class="like-1">
								<img src="img/zx2.png">
							</div>
							<div class="like-2">
								<a href="#">
									<span class="glyphicon glyphicon-eye-open"></span>
									<span>了解详情</span>
								</a>
								<a href="#">
									<span class="glyphicon glyphicon-shopping-cart"></span>
									<span>加入购物车</span>
								</a>
							</div>

							<div class="like-4">
								<div class="like-4-1">无抗猪肉-放心猪肉</div>
								<div class="like-4-2">慢养300天,肉香浓郁</div>
								<div class="like-4-3">¥69/斤</div>
							</div>

						</div>
						<div class="like">
							<div class="like-1">
								<img src="img/zx2.png">
							</div>
							<div class="like-2">
								<a href="#">
									<span class="glyphicon glyphicon-eye-open"></span>
									<span>了解详情</span>
								</a>
								<a href="#">
									<span class="glyphicon glyphicon-shopping-cart"></span>
									<span>加入购物车</span>
								</a>
							</div>
							<div class="like-4">
								<div class="like-4-1">无抗猪肉-放心猪肉</div>
								<div class="like-4-2">慢养300天,肉香浓郁</div>
								<div class="like-4-3">¥69/斤</div>
							</div>
						</div>
						<div class="like">
							<div class="like-1">
								<img src="img/zx2.png">
							</div>
							<div class="like-2">
								<a href="#">
									<span class="glyphicon glyphicon-eye-open"></span>
									<span>了解详情</span>
								</a>
								<a href="#">
									<span class="glyphicon glyphicon-shopping-cart"></span>
									<span>加入购物车</span>
								</a>
							</div>
							<div class="like-4">
								<div class="like-4-1">无抗猪肉-放心猪肉</div>
								<div class="like-4-2">慢养300天,肉香浓郁</div>
								<div class="like-4-3">¥69/斤</div>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		{!! Theme::asset()->container('specific-css')->usePath()->add('css0','css/cart.css') !!}
		{!! Theme::asset()->container('specific-css')->usePath()->add('css1','css/detail.css') !!}
        <script src="{{Theme::asset()->url('js/cart.js')}}"></script>
        {{--删除购物车商品 单个删除--}}
        <script>
            $('.del').click(function(){
                var order_id = $(this).attr('order_id');
                var url = "{{url('home/cartDel')}}";
                var ids = [];
                ids[0] = order_id;
                var jsids = JSON.stringify(ids);
                var _token="{{csrf_token()}}";
                $.post(
                    url,
                    {
                        '_token':_token,
                        'jsids':jsids
                    },
                    function(e){
                        if(e) {
                            window.location.reload();
                        }
                    }
                )
            })
        </script>
        <script>
            $("#allCheck").click(function() {
                var a = document.getElementById("allCheck"); //获取全选按钮
                var b = document.getElementsByName("check"); //获取自选按钮组
                if(a.checked) {
                    for(var i = 0; i < b.length; i++) {
                        b[i].checked = true;
                    }
                } else {
                    for(var i = 0; i < b.length; i++) {
                        b[i].checked = false;
                    }
                }
            })
            //单选框
            $("input[name='check']").click(function() {
                var flag = true;
                var a = document.getElementById("allCheck");
                var b = document.getElementsByName("check");
                for(var i = 0; i < b.length; i++) {
                    if(!b[i].checked) {
                        flag = false;
                        break;
                    }
                }
                a.checked = flag;
            });
        </script>